package com.netforce.core.aspect;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Component
@Aspect
public class TestInjectCodeAspect
{
  @Around("anyLevelBasedOperation(anAnnotation)")
  public Object checkLevel(ProceedingJoinPoint aProceedingJoinPoint, TestInjectCode anAnnotation) throws Throwable
  {
    System.out.println("Signature : " + aProceedingJoinPoint.getSignature().getName());
    return aProceedingJoinPoint.proceed();
  }

  @Pointcut("execution(* com.netforce..*.*(..)) && @annotation(anAnnotation)")
  private void anyLevelBasedOperation(TestInjectCode anAnnotation)
  {
  }
}
